A Declarative Debugger for a Logical-Functional Language

نویسندگان

  • Lee Naish
  • Tim Barbour
چکیده

Logic and functional programming languages have many advantages and there is a growing trend to develop languages which incorporate both these paradigms. One of the disadvantages of such languages is that the execution mechanisms are so complex that traditional debugging methods are diicult to use. Declarative debugging techniques have been successful applied to Prolog and more recently functional languages. They allow programs to be debugged using only knowledge of the declarative semantics, hiding the details of the execution from the programmer. In this paper we describe a declarative debugger for a combined logic and functional programming language, NUE-Prolog. The debugger combines both existing and new algorithms. The main new algorithm is for declarative debugging of functions which for some inputs are not well-deened (typically resulting in a runtime error). The algorithms can easily be adapted to other logic and functional languages.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards a Portable Lazy Functional Declarative Debugger

Declarative (or algorithmic) debugging is a promising technique for debugging lazy functional programs. This paper addresses two important reasons why it is not more widespread: the diiculty of writing a declarative debugger for a lazy functional language in the language itself and the eeciency of the debugger. Using the source language to implement the debugger is desirable for portability and...

متن کامل

Theoretical Foundations for the Declarative Debugging of Lazy Functional Logic Programs

The aim of this paper is to provide theoretical foundations for the declarative debugging of wrong answers in lazy functional logic programming. We rely on a logical framework which formalizes both the intended meaning and the execution model of programs in a simple language which combines the expressivity of pure Prolog and a signi cant subset of Haskell. As novelties w.r.t. to previous relate...

متن کامل

Declarative Debugging of Lazy Functional Programs

We show how declarative (or algorithmic) debugging can be applied to lazy functional programming and describe a prototype implementation. We rst present a declarative debugger for logic programs which relies on three primitives that determine if an atom is valid in the intended interpretation, return the successful clause instance used by a call and return single atoms from a conjunction of ato...

متن کامل

A Declarative Debugger for Maude Functional Modules

A declarative debugger for Maude functional modules, which correspond to executable specifications in membership equational logic, is presented. Starting from an incorrect computation, declarative debugging builds a debugging tree as a logical representation of the computation, that then is traversed by asking questions to an external oracle until the error is found. We summarize the constructi...

متن کامل

A Declarative Debugging System for Lazy Functional Logic Programs

We present a declarative debugger for lazy functional logic programs with poly-morphic type discipline. Whenever a computed answer is considered wrong by theuser (error symptom), the debugger locates a program fragment (function definingrule) responsible for the error. The notions of symptom and error have a declara-tive meaning w.r.t. to an intended program semantics. Debug...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994